Skip to content

Switch from local bootstrap and bootstrap-icons to their WebJars resources - #363

Open
peutch wants to merge 3 commits into
struts-community-plugins:release/6.0.xfrom
peutch:release/6.0.x
Open

Switch from local bootstrap and bootstrap-icons to their WebJars resources#363
peutch wants to merge 3 commits into
struts-community-plugins:release/6.0.xfrom
peutch:release/6.0.x

Conversation

@peutch

@peutch peutch commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

Hi,

Following my remark about the use of WebJars in issue #354, here is an attempt to migrate struts2-bootstrap as an illustration.
I think it could simplify upgrading the dependency to Bootstrap and Bootstrap Icons components.
Note that it also includes a small fix 4ca2fbf.

Regards,
Patrice

@lukaszlenart

Copy link
Copy Markdown
Member

but shouldn't we add support for WebJars into Struts itself?

@peutch

peutch commented Jan 21, 2025

Copy link
Copy Markdown
Contributor Author

I think at least something could be done in the same way for struts2-jquery if there is interest in it.

@lukaszlenart

lukaszlenart commented Jan 21, 2025

Copy link
Copy Markdown
Member

I meant to add support for /webjars/* endpoint, currently Struts is serving static content using only /static/*, an example
https://www.baeldung.com/maven-webjars#Simple

@peutch

peutch commented Jan 22, 2025

Copy link
Copy Markdown
Contributor Author

Could struts.ui.staticContentPath be a list?

@gregh3269

Copy link
Copy Markdown
Contributor

The down side is it does make it more difficult to debug (ie adding console.log) as the assets are in a jar.

Also don't want the pom versions managed by renovate bot.

@lukaszlenart

Copy link
Copy Markdown
Member

Could struts.ui.staticContentPath be a list?

It can be, but I would rather add a dedicated logic to serve WebJars, something like struts.serve.webJars=true and then struts.ui.webJarsPath=/webjars

@lukaszlenart

Copy link
Copy Markdown
Member

I'm going to add support for webjars in the framework itself and then implement it here
apache/struts#1765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants